package cn.myplus.blog.response;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author libo.
 * @date 2022/5/29
 */
public class ResponseBodyWithMeta {

    private Map<String, Object> meta;

    private List data;

    public ResponseBodyWithMeta() {
        this.meta = new HashMap<>();
        this.data = new ArrayList(0);
    }

    public ResponseBodyWithMeta(Map<String, Object> meta, List data) {
        this.meta = meta;
        this.data = data;
    }

    public void setPagination(Pagination pagination) {
        meta.put("pagination", pagination);
    }

    public Map<String, Object> getMeta() {
        return meta;
    }

    public void setMeta(Map<String, Object> meta) {
        this.meta = meta;
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }
}
